package model

import "gorm.io/gorm"

type Users struct {
	gorm.Model
	Username string `gorm:"type:char(11);unique;not null;comment:'手机号'"`
	Password string `gorm:"type:char(32);not null;comment:'密码'"`
	Role     int    `gorm:"type:int;default:1;not null;comment:'角色:1-普通用户 2-会员'"`
	Growth   int    `gorm:"type:int;default:0;not null;comment:'成长值'"`
	Period   int    `gorm:"type:int;default:0;not null;comment:'有效期'"`
}

func (u *Users) TableName() string {
	return "users"
}
